From: Florian Müllner Date: Sat, 15 Jun 2019 12:54:39 +0000 (+0200) Subject: shell: Remove shell_global_structured_log() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~145 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=523ba5a719720da76eba35dd0ba6b67936ab3bf4;p=gnome-shell.git shell: Remove shell_global_structured_log() It is now unused. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/579 --- diff --git a/src/shell-global.c b/src/shell-global.c index 70120c2da..28a1ccb2e 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -29,12 +29,6 @@ #include #include -#ifdef HAVE_SYSTEMD -#include -#include -#include -#endif - /* Memory report bits */ #ifdef HAVE_MALLINFO #include @@ -1171,52 +1165,6 @@ shell_global_reexec_self (ShellGlobal *global) #endif } -/** - * shell_global_log_structured: - * @message: A message to print - * @keys: (allow-none) (array zero-terminated=1) (element-type utf8): Optional structured data - * - * Log structured data in an operating-system specific fashion. The - * parameter @opts should be an array of UTF-8 KEY=VALUE strings. - * This function does not support binary data. See - * http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html - * or more information about fields that can be used on a systemd - * system. - * - */ -void -shell_global_log_structured (const char *message, - const char *const *keys) -{ -#ifdef HAVE_SYSTEMD - const char *const*iter; - char *msgkey; - guint i, n_opts; - struct iovec *iovs; - - for (n_opts = 0, iter = keys; *iter; iter++, n_opts++) - ; - - n_opts++; /* Add one for MESSAGE= */ - iovs = g_alloca (sizeof (struct iovec) * n_opts); - - for (i = 0, iter = keys; *iter; iter++, i++) { - iovs[i].iov_base = (char*)keys[i]; - iovs[i].iov_len = strlen (keys[i]); - } - g_assert(i == n_opts-1); - msgkey = g_strconcat ("MESSAGE=", message, NULL); - iovs[i].iov_base = msgkey; - iovs[i].iov_len = strlen (msgkey); - - // The code location isn't useful since we're wrapping - sd_journal_sendv (iovs, n_opts); - g_free (msgkey); -#else - g_print ("%s\n", message); -#endif -} - /** * shell_global_notify_error: * @global: a #ShellGlobal diff --git a/src/shell-global.h b/src/shell-global.h index 9d9bc19fd..67556263b 100644 --- a/src/shell-global.h +++ b/src/shell-global.h @@ -79,9 +79,6 @@ void shell_global_init_xdnd (ShellGlobal *global); void shell_global_reexec_self (ShellGlobal *global); -void shell_global_log_structured (const char *message, - const char *const *keys); - const char * shell_global_get_session_mode (ShellGlobal *global); void shell_global_set_runtime_state (ShellGlobal *global,